﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>商家操作</title>
    <link href="~/plugins/layui/css/layui.css" rel="stylesheet" />
</head>
<body style="margin-left:10px;margin-top:10px;">
    @using (Html.BeginForm("buyau", "ljsheng", new { gid = Request.QueryString["gid"] }, FormMethod.Post, new { @class = "layui-form layui-form-pane", enctype = "multipart/form-data" }))
    {
        <div class="layui-form-item">
            <label class="layui-form-label">套餐名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="account" placeholder="请输入" autocomplete="off" class="layui-input" value="@ViewBag.name" readonly>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">原价</label>
                <div class="layui-input-inline" style="width: 80px;">
                    <input type="text" name="yjrmb" lay-verify="num" placeholder="原价" autocomplete="off" class="layui-input" onkeyup="value=value.replace(/[^\d]/g,'');" value="@ViewBag.yjrmb">
                </div>
                <div class="layui-form-mid">售价</div>
                <div class="layui-input-inline" style="width: 80px;">
                    <input type="text" name="payrmb" lay-verify="num" placeholder="优惠价" autocomplete="off" class="layui-input" onkeyup="value=value.replace(/[^\d]/g,'');" value="@ViewBag.payrmb">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn" lay-submit="">提交</button>
        </div>
    }
    <script src="~/js/jquery.js"></script>
    <script src="~/plugins/layui/layui.js"></script>
    <script>
        layui.use(['form', 'layedit'], function () {
            var form = layui.form();
            form.verify({
                num: function (value) {
                    if (value.length < 1) {
                        return '至少得1个字符啊';
                    }
                }
            });
        });
    </script>
</body>
</html>
